package com.education.online.controller;


import com.education.common.utils.ApiReturnObject;
import com.education.online.pojo.OTestQuestions;
import com.education.online.service.OTestQuestionsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 职业技能测试试题表
 *
 * @date 2020-06-04 15:17:49
 */
@Api(tags = {"PC--职业技能测试试题表"})
@RestController
@RequestMapping("/online/otestquestions")
public class OTestQuestionsController {

    @Autowired
    private OTestQuestionsService oTestQuestionsService;


    @ApiOperation(value = "试题接口", httpMethod = "GET")
    @GetMapping("/selectList")
    public ApiReturnObject selectList(Integer parperId){
        List<OTestQuestions> oTestQuestionsList = oTestQuestionsService.selectOTestQuestionsByParperId(parperId);

        return new ApiReturnObject("200","success",oTestQuestionsList.size(),oTestQuestionsList);
    }

}
